#ifndef _FLASH_H_
#define _FLASH_H_
/*private include********************************************************************/
#include "stm32l0xx_hal.h"
/*private define*******************************************************************/
#define FLASH_USER_START_ADDR   0x8008000   /* Start @ of user Flash area */
#define FLASH_USER_END_ADDR     0x800A000   /* End @ of user Flash area */

#define FLASH_PAGE_NUMBER_OF_SECTOR      32

typedef enum flash_status{
    FLASH_OK = 0x00,
    FLASH_ERROR,
}flash_status_t;

/*private function*******************************************************************/
flash_status_t flash_page_write(uint32_t address, uint32_t* data, uint32_t page_number);
flash_status_t flash_sector_write(uint32_t address, uint32_t* data);
flash_status_t flash_page_content_check(uint32_t address, uint32_t* data, uint32_t page_number);
flash_status_t flash_page_erase(uint32_t address, uint32_t page_number);
#endif //_FLASH_H_

